package com.wzh.controll;


import com.wzh.pojo.Po.Mes;
import com.wzh.pojo.Req.DataReq;
import com.wzh.pojo.Resp.DataResp;
import com.wzh.service.MesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import sun.dc.pr.PRError;

@RestController
@RequestMapping("/Mes")
public class MesController {
	@Autowired
	private MesService mesService;

	@PostMapping("/add")
	@ResponseBody
	public DataResp add(@RequestBody Mes mes){
		DataResp<Object> resp= mesService.add(mes);
		return resp;
	};


	@PostMapping("/update")
	@ResponseBody
	public DataResp update(@RequestBody Mes mes){
		DataResp<Object> resp= mesService.update(mes);
		return resp;
	};

	@PostMapping("/show")
	@ResponseBody
	public DataResp show(@RequestBody DataReq req){
		DataResp<Object> resp= mesService.show(req);
		return resp;
	};
}
